//
//  JournalListCell.m
//  DataStatistics
//
//  Created by Kang on 16/4/14.
//  Copyright © 2016年 YTYangK. All rights reserved.
//

#import "JournalListCell.h"
#import "UIimageView+WebCache.h"


@interface JournalListCell ()

@property (strong, nonatomic) IBOutlet UILabel *JLCell_workType;
@property (strong, nonatomic) IBOutlet UILabel *JLCell_workDate;


@end

@implementation JournalListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


- (void)setModelCellData:(JouList *)modelCellData {
    _modelCellData = modelCellData;
    [self vlueWithList:_modelCellData];
    
}



#pragma mark - 设置Cell UI及数据更新
- (void)vlueWithList:(JouList *)list {
    

    //报警时间
    self.JLCell_workDate.text =list.createTime;
    
    //判断离线还是异常
    if (list.state == 11) {
        self.JLCell_workType.text = @"运行正常";
    }else if(list.state ==12){
        self.JLCell_workType.text = @"压力超压";
    }else if(list.state == 21){
        self.JLCell_workType.text = @"系统关机";
    }else if(list.state == 22){
        self.JLCell_workType.text = @"系统关机 压力超压";
    }else if (list.state == 31){
        self.JLCell_workType.text = @"电机故障";
    }else if (list.state == 32){
        self.JLCell_workType.text = @"电机故障 压力超压";
    }else if (list.state == 41){
        self.JLCell_workType.text = @"电机缺相";
    }else if (list.state == 42){
        self.JLCell_workType.text = @"电机缺相 压力超压";
    }else{
        self.JLCell_workType.text = @"设备离线";
    }
    
    

}





@end
